{% extends 'base.html' %}

{% block title %}
    {% if alt_title %}
      {% if not name %}
      {{alt_title}} - {{type_epsg}}:{{code_short[0]}}
      {% else %}
        {{name}} - {{alt_title}} - {{type_epsg}}:{{code_short[0]}}
      {% endif %}
    {% else %}
      {% if not name %}
      {{type_epsg}}:{{code_short[0]}}
      {% else %}
        {{name}} - {{type_epsg}}:{{code_short[0]}}
      {% endif %}
    {% endif %}
{% endblock %}

{% block description %}
    {% if item['area'] !="" or item['remarks'] !="" or item['scope']!="" %}
    EPSG:{{code_short[0]}} {{kind}} for {{item['area']}} {{item['remarks']}} {{item['scope']}}
    {% else %}
    EPSG:{{code_short[0]}} {{kind}}
    {% endif %}
{% endblock %}

{% block image %}
    {% if not url_static_map[1] %}
        {{ url_for('static', filename='/static/img/logo.png') }}
    {% endif %}
{% endblock %}

{% block body %}
<body id="detailpage" data-role="page">
{% endblock %}
  {% block content %}

  <div class="row mar-mobile">
    <div class="container">
      <div class="col7 padt-4 pad-mobile center-mobile">
        {% if item['deprecated'] == 1 or item['deprecated'] == "true" %}
        <h1><b>{{type_epsg}}:{{code_short[0]}} DEPRECATED</b> </h1>
        {% else %}
        <h1><b>{{type_epsg}}:{{code_short[0]}}</b> </h1>
        {% endif %}
        {% if alt_title %}
        <h2 class="padt-2">{{name}} -- {{alt_title}}</h2>
        {% else %}
        <h2 class="padt-2">{{name}}</h2>
        {% endif %}
      </div>
      <div class="col5 padx-0 padt-4 pad-mobile center-mobile">
        <div class="social circles detail-sc-big block right">
          <p>Share on:
            <a class="T" target="_blank" href="https://twitter.com/share?original_referer=//epsg.io&amp;text=EPSG.io: Coordinate systems worldwide, view location on a map, get transformation, WKT, Proj.4. made by @klokantech">T</a>
            <a class="G" target="_blank" href="https://pinterest.com/pin/create/button/?url=http%3A%2F%2Fepsg.io&amp;media=%2F%2Fdirect.epsg.io%2Fimg%2Fepsg-banner-440x280-2.png&description=EPSG.io:%20Coordinate%20systems%20worldwide%20(EPSG/ESRI),%20preview%20location%20on%20a%20map,%20get%20transformation,%20WKT,%20OGC%20GML,%20Proj.4.%20http://EPSG.io/%20made%20by%20@klokantech">Q</a>
          </p>
        </div>
        <div class="right mary-2 mar-mobile center-mobile">
          <a class="btn mar-1 mart-0" href="/transform#s_srs={{url_social}}" title="Transform {{name}} -- {{alt_title}} coordinates">
            Transform</a>
          <a class="btn mar-1 mart-0" href="/map#srs={{url_social}}" title="Display {{name}} -- {{alt_title}} on a map">
            Get&nbsp;position&nbsp;on&nbsp;a&nbsp;map</a>
        </div>
        <div class="social circles detail-sc-small">
          <p>Share on
            <a class="T" target="_blank" href="https://twitter.com/share?original_referer=//epsg.io&amp;text=EPSG.io: Coordinate systems worldwide, view location on a map, get transformation, WKT, Proj.4. made by @klokantech">T</a>
            <a class="G" target="_blank" href="https://pinterest.com/pin/create/button/?url=http%3A%2F%2Fepsg.io&amp;media=%2F%2Fdirect.epsg.io%2Fimg%2Fepsg-banner-440x280-2.png&description=EPSG.io:%20Coordinate%20systems%20worldwide%20(EPSG/ESRI),%20preview%20location%20on%20a%20map,%20get%20transformation,%20WKT,%20OGC%20GML,%20Proj.4.%20http://EPSG.io/%20made%20by%20@klokantech">Q</a>
          </p>
        </div>
      </div>
    </div>
  </div>



  {% set found_trans = 'False' %}
  {% if trans != [] or (center and trans_lat) or (detail !=[] and detail[0]['url_area']!="/?q=") or (item['kind']=="PRIMEM" or item['kind']=="AXIS") or item['data_source'] %}
  <div class="row">
    <div class="container">
      <div class="col9">
        <div class="row">
          {% set no_trans = 'False' %}
          {% if trans %}
          <div class="col6 padx-0">
          <h3>Available transformations</h3>
            <ul class="bordertop-gray-light alt-search">
              {% for r in trans %}
              {% if r['link'] == "" and r['deprecated'] == 0 %}
              <li><i></i>

                <span class="caption">{{r['area_trans_trans']}}</span>

                {% if r['accuracy'] %}
                , accuracy&nbsp;{{r['accuracy']}}&nbsp;m,
                {% endif %}

                {% if r['code_trans'] != 0 %}
                code&nbsp;{{r['code_trans']}}
                {% endif %}

                {% if r['default'] == True %}
                <em>(default)</em>
                {% endif %}
                {% if r['num_param'] %}
                [{{r['num_param']}}]
                {% endif %}

              </li>

              {% elif r['deprecated'] == 0 %}
              <li>
                <a href="/{{r['link']}}" title="{{r['trans_remarks']}}">
                  <span class="caption">{{r['area_trans_trans']}}</span>, accuracy&nbsp;{{r['accuracy']}}&nbsp;m, code&nbsp;{{r['code_trans']}}
                  {% if r['default'] == True %}
                  <em>(default)</em>
                  {% endif %}
                  {% if r['num_param'] %}
                  [{{r['num_param']}}]
                  {% endif %}
                </a>
              </li>
              {% endif %}
              {% endfor %}

              {% if deprecated_available == 1 %}

                <a href="#" id="trans_deprecated_link">Show deprecated transformations</a>
                <div id="trans_deprecated">

                  {% for r in trans %}
                  {% if r['deprecated'] == 1 %}
                  {% if r['link'] == "" %}
                  <li><i></i>
                    {% if r['default'] == True %}
                    <span class="caption"><em>(default)</em></span>
                    {% endif %}
                    <span class="caption">{{r['area_trans']}}</span>, accuracy&nbsp;{{r['accuracy']}}&nbsp;m, code&nbsp;{{r['area_trans_trans']}} <em>(deprecated)</em>
                    {% if r['num_param']: %}
                    [{{r['num_param']}}]
                    {% endif %}
                  </li>
                  {% else %}
                  <li>
                    {% if r['default'] == True: %}
                    <span class="caption"><em>(default)</em></span>
                    {% endif %}
                    <a href="/{{r['link']}}" title="{{r['trans_remarks']}}"><span class="caption">{{r['area_trans_trans']}}</span>, accuracy&nbsp;{{r['accuracy']}}&nbsp;m, code&nbsp;{{r['code_trans']}} <em>(deprecated)</em>
                      {% if r['num_param'] %}
                      [{{r['num_param']}}]
                      {% endif %}
                    </a>
                  </li>
                  {% endif %}
                  {% endif %}
                  {% endfor %}
                </div>
                <p></p>

                {% endif %}
            </ul>

          </div>
        {% else %}
      </div>
      {% set no_trans = 'True' %}
      {% if 'alt_description' in item %}
      {% if item['alt_description'] %}
      {% if wkt %}
        <div id="description-message"><p>{{item['alt_description']|safe}}</p></div>
      {% else %}
      {% if export_html %}
      <div id="description-message">{{export_html}} </div>
      {% else %}
      <div id="description-message">{{item['alt_description']}} </div>
      {% endif %}
      {% endif %}
      {% endif %}
      {% endif %}

      {% if 'alt_code' in item %}
      {% if item['alt_code'] != [''] %}
      <p>
        <span class="caption">Alternatives codes : </span>
        {% for a in item['alt_code'] %}
        <a href="/{{a}}">{{a}}</a>
        {% endfor %}
      </p>
      {% endif %}
      {% endif %}
      {% endif %}

      {% if trans %}
      <div class="col5 offset1 padx-0">
        {% set found = 'False' %}
        <h3 >Selected transformation</h3>
        {% for r in trans %}
        {% if r['link'] == "" and not found %}
        {% set found = 'True' %} <p class="bordertop-gray-light">
        <h2>
          {{r['area_trans_trans']}}
        </h2>
        <p>
        {% if r['code_trans'] != 0 %}
        code <a href="/{{r['code_trans']}}">{{r['code_trans']}}</a>
        {% endif %}
          <br>
          {% if r['accuracy'] %}
          Accuracy&nbsp;{{r['accuracy']}}&nbsp;m
          {% endif %}

          {% if r['default'] == True %}
          (default)
          {% endif %}
          <br />
          {% if r['num_param'] != "grid" and r['num_param'] %}
          {{r['num_param']}} parameters
          {% elif r['num_param'] == "grid" %}
          grid file
          {% endif %}
        </p>
        {% endif %}
        {% endfor %}

        {% set no_default = 'False' %}
        {% if not found %}
        {% set no_default = 'True' %}
        {% if not no_trans %}
        <p>NO DEFAULT TRANSFORMATION</p>
        {% endif %}
        {% endif %}

        {% if trans and default_trans %}
        <div class="attributes bordertop-gray-light">
          {% if default_trans['method'] %}
          <p><span class="caption">Method: </span><a href="/{{default_trans['method'][0]}}-method">{{default_trans['method'][1]}}</a></p>
          {% endif %}
          <p><span class="caption">Remarks: </span>{{default_trans['remarks']}}</p>
          <p><span class="caption">Information source: </span>{{default_trans['information_source']}}</p>
          <p><span class="caption">Revision date: </span>{{default_trans['revision_date']}}</p>

          {% if url_concatop != [] %}
          <p>
            <span class="caption">Steps of transformation: </span>
            {% for url in url_concatop %}
            <a href="{{url}}">{{url}} </a>
            {% endfor %}
          </p>
          {% endif %}
        </div>
        {% endif %}


      </div>
    </div>

      {% endif %}

      <div class="clnr"></div>

      <div class="row pad-col">
        <h3 >Attributes</h3>
      <div class="bordertop-gray-light">
      <div class="col6 padx-0">
        {% if 'uom_code' in item %}
        {% if item['uom_code'] %}
        <p><span class="caption">Unit: </span>{{item['uom']}}</p>
        {% endif %}
        {% endif %}

        {% if 'geogcrs' in item %}
        {% if item['geogcrs'] %}
        <p><span class="caption">Geodetic CRS: </span><a href="/{{item['geogcrs'][0]}}">{{item['geogcrs'][1]}}</a></p>
        {% endif %}
        {% endif %}

        {% if 'datum' in item %}
        {% if item['datum'] != 0 and item['datum'] %}
        <p><span class="caption">Datum: </span><a href="/{{item['datum'][0]}}-datum">{{item['datum'][1]}}</a></p>
        {% endif %}
        {% endif %}

        {% if 'ellipsoid' in item %}
        {% if item['ellipsoid'] %}
        {% if item['ellipsoid'][0] != "None" %}
        <p><span class="caption">Ellipsoid: </span><a href="/{{item['ellipsoid'][0]}}-ellipsoid">{{item['ellipsoid'][1]}}</a></p>
        {% endif %}
        {% endif %}
        {% endif %}

        {% set gl = 'False' %}
        {% if 'primem' in item %}
        {% if item['primem'] %}
        <p>
          <span class="caption">Prime meridian: </span><a href="/{{item['primem'][0]}}-primem">{{item['primem'][1]}}</a>

          <!-- XXX:  -->
          <!--  {# {% if 'greenwich_longitude' in item %}
             {% if int(item['primem'][0]) != 8901 and str(greenwich_longitude) != str(361) %}
                      ({{greenwich_longitude}} degree from Greenwich)
                      {% set gl = 'True' %}
                      {% endif %}
                      {% endif %} #} -->
          {% endif %}
          {% endif %}

          {% if detail != [] and not gl %}
          {% if 'greenwich_longitude' in item %}
          {% if item['greenwich_longitude'] != 0 and item['greenwich_longitude'] and str(greenwich_longitude) != str(361) %}
          <p><span class="caption">Degree from Greenwich: </span>{{greenwich_longitude}}</p>
          {% endif %}
          {% endif %}
          {% endif %}

          {% if 'data_source' in item %}
          {% if item['data_source'] %}
          <p><span class="caption">Data source: </span>{{item['data_source']}} </p>
          {% endif %}
          {% endif %}

          {% if 'information_source' in item %}
          {% if item['information_source'] %}
          <p><span class="caption">Information source: </span>{{item['information_source']}}</p>
          {% endif %}
          {% endif %}

          {% if 'revision_date' in item %}
          {% if item['revision_date'] %}
          <p><span class="caption">Revision date: </span>{{item['revision_date']}}</p>
          {% endif %}
          {% endif %}


          {% if url_concatop != [] %}
          <p>
            <span class="caption">Steps of transformation: </span>
            {% for url in url_concatop %}
            <a href="{{url}}">{{url}} </a>
            {% endfor %}
          </p>
          {% endif %}

          {% if nadgrid %}
          <p><span class="caption">NadGrid file: </span>{{nadgrid}}</p>
          {% endif %}

          {% if item['target_uom'] %}
          {% if code_short[0] | int != item['target_uom'][0] | int %}
          <p><span class="caption">Target unit: </span><a href="/{{item['target_uom'][0]}}-units">{{item['target_uom'][1]}}</a></p>
          {% endif %}
          {% endif %}

          {% if item['files'] %}
          <p><span class="caption">File: </span>{{item['files']}}</p>
          {% endif %}


          {% if item['orientation'] %}
          <p><span class="caption">Orientation: </span>{{item['orientation']}}</p>
          {% endif %}

          {% if item['abbreviation'] %}
          <p><span class="caption">Abbreviation: </span>{{item['abbreviation']}}</p>
          {% endif %}

          {% if item['order'] %}
          <p><span class="caption">Axis order: </span>{{item['order']}}.</p>
          {% endif %}

          {% if detail != [] %}
          {% if detail[0]['url_axis'] %}
          {% for a in detail[0]['url_axis'] %}
          <p><span class="caption">Link to axis : </span><a href="/{{a['axis_code']}}-axis">{{a['axis_name']}}</a></p>
          {% endfor %}
          {% endif %}
          {% endif %}
      </div>
      <div class="col6 padx-0">

        {% if 'scope' in item %}
        {% if item['scope'] %}
        <p>
          <span class="caption">Scope: </span>{{item['scope']}}
        </p>
        {% endif %}
        {% endif %}

        {% if 'remarks' in item %}
        {% if item['remarks'] %}
        <p>
          <span class="caption">Remarks: </span>{{item['remarks']}}
        </p>
        {% endif %}
        {% endif %}

        {% if "method" in item %}
        {% if item['method'] %}
        <p><span class="caption">Method: </span><a href="/{{item['method'][0]}}-method" title="">{{item['method'][1]}}</a></p>
        {% endif %}
        {% endif %}

        {% if detail %}
        {% if detail[0]['url_area'] != "" and detail[0]['url_area'] != "/?q=" and item['kind'] != "AREA" %}
        <p>
          <span class="caption">Area of use: </span><a href="{{detail[0]['url_area']}}"> {{item['area']}}</a>
        </p>
        {% endif %}
        {% else %}
        {% if item['area'] != "" %}
        <p>
          <span class="caption">Area of use: </span><a href="{{url_area}}">{{area_item}}</a>
        </p>
        {% endif %}
        {% endif %}

        {% if 'cs' in item %}
        {% if item['cs'] %}
        <p>
          <span class="caption">Coordinate system: </span><a href="/{{item['cs'][0]}}-cs">{{item['cs'][1]}}</a>
        </p>
        {% endif %}
        {% endif %}

        {% if 'description' in item %}
        {% if item['description'] %}
        <p><span class="caption">Description: </span>{{item['description']}}</p>
        {% endif %}
        {% endif %}

      </div>
    </div>
  </div>
</div>

  <div class="col3 padx-0  borderbottom-gray-light">
  <a href="https://www.maptiler.com" class=" maptiler-power" target="_blank">
    <h6 class="center" >Covered area powered by MapTiler
      <img class="width-10" src="/static/img/maptiler-logo-icon.png" alt="MapTiler logo">
    </h6>
  </a>
  </div>
    <div class="col3 minimap-pad">
        {% set no_map = 'False' %}
        {% if item['bbox'] %}

        {% if center %}
        {% if trans_lat: %}
        <div id="mini-map" class=" center-mobile">
          <a href="{{url_format}}/map">
            <img src="/static/img/epsg-target-small.png" id="crosshair" alt="" />
            <img src="{{url_static_map[1]}}" alt="SimpleMap" width="265" height="215">

          </a>
        </div>
        {% else %}
        <div id="mini-map" class=" center-mobile">
          <img src="/static/img/epsg-target-small.png" id="crosshair" alt="" />
          <img src="{{url_static_map[1]}}" alt="SimpleMap" width="265" height="215">
        </div>
        {% endif %}
        {% endif %}
        {% else %}
        {% set no_map = 'True' %}
        {% endif %}

        {% set wgs_found = 'False' %}

        {% if trans_lat and trans_lon %}
        <p>
          <span class="caption">Center coordinates</span><br />
          <span>{{trans_lat}}</span> <span>{{trans_lon}}</span> <br />
          {% if item['kind'] != "CRS-GEOGCRS" %}
          {% set wgs_found = 'True' %}
          <p>
            <span class="caption">Projected bounds:</span><br />
            {{bbox_coords[3]}} {{bbox_coords[2]}}<br />
            {{bbox_coords[1]}} {{bbox_coords[0]}}<br />
          </p>
          {% endif %}
          <p>
            {% if default_trans %}
            {% set wgs_found = 'True' %}

            <span class="caption">WGS84 bounds:</span><br />
            {{default_trans['bbox'][1]}} {{default_trans['bbox'][2]}}<br />
            {{default_trans['bbox'][3]}} {{default_trans['bbox'][0]}}
            {% else %}
            {% set wgs_found = 'True' %}
            <span class="caption">WGS84 bounds:</span><br />
            {{item['bbox'][1]}} {{item['bbox'][2]}}<br />
            {{item['bbox'][3]}} {{item['bbox'][0]}}
            {% endif %}

          </p>
        </p>
        {% endif %}

        {% if bbox_coords and not (trans_lat or trans_lon) and bbox_coords != ("","","","") %}
        <p>
          <span class="caption">WGS84 bounds:</span><br />
          {{bbox_coords[1]}} {{bbox_coords[2]}}<br />
          {{bbox_coords[3]}} {{bbox_coords[0]}}
        </p>
        {% elif item['bbox'] and not wgs_found %}
        <p>
          <span class="caption">WGS84 bounds:</span><br />
          {{item['bbox'][1]}} {{item['bbox'][2]}}<br />
          {{item['bbox'][3]}} {{item['bbox'][0]}}
        </p>
        {% endif %}

        {% if default_trans %}
        <a href="{{url_area_trans}}">{{default_trans['area']}}</a>
        {% elif item['area'] and (url_area) %}
        <a href="{{url_area}}">{{item['area']}}</a>
        {% endif %}

        {% set found_trans = 'False' %}
        {% if item['kind'].startswith("COORDOP") %}
        <p></p>
        {% set found_trans = 'True' %}
        <div id="projected-link-trans">
          {% if projcrs_by_gcrs %}

          <h3 >Coordinates on a map</h3>
          {% endif %}

          {% for r in projcrs_by_gcrs %}
          <a href="/{{r['result']['code']}}/map"><span class="caption">{{r['result']['name']}}</span></a>

          code <a href="{{r['result']['code']}}">{{r['result']['code']}}</a><br />
          {% endfor %}

          {% if more_gcrs_result %}
          <a href="{{more_gcrs_result}}">More</a>
          {% endif %}
        </div>
        {% endif %}
      </div>
    </div>
  </div>
  {% else %}
  {% if 'alt_description' in item %}
  {% if item['alt_description'] %}
  <div id="description-message">{{item['alt_description']}}</div>
  {% endif %}
  {% endif %}

  {% if 'alt_code' in item %}
  {% if item['alt_code'] != [''] %}
  <p>
    <span class="caption">Alternatives codes : </span>
    {% for a in item['alt_code'] %}
    <a href="/{{a}}">{{a}}</a>
    {% endfor %}
  </p>
  {% endif %}
  {% endif %}
  {% endif %}

  <div class="row">
    <div class="container center bordertop-gray-light pady-2">
      <div class="col12">
        <a href="https://www.maptiler.com/cloud/"><img class="width-100" src="/static/img/maptiler-gmaps-banner.png" alt="MapTiler banner"></a>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="container">
      <div id="edit-box-container">
        {% if url_format and error_code == 0 %}
        <div class="col3">
        <div id="eb-menu-container">
          <h4>Export</h4>
          <ul id="eb-menu">
            <li><a class="switcher switcher_selected" id="s_html" href="{{url_format}}.html">Well Known Text as HTML<i></i></a></li>
            <li><a class="switcher" id="s_wkt" href="{{url_format}}.wkt">OGC WKT<i></i></a></li>
            <li><a class="switcher" id="s_esriwkt" href="{{url_format}}.esriwkt">ESRI WKT<i></i></a></li>

            <!-- <li><a class="switcher" id="s_prettywkt" href="{{url_format}}.prettywkt">PrettyWKT<i></i></a></li>-->
            {% if ogpxml != "" %}
            <li><a class="switcher" id="s_gml" href="{{url_format}}.gml">OGC GML<i></i></a></li>
            {% endif %}
            {% if export['xml'] != "" %}
            <li><a class="switcher" id="s_xml" href="{{url_format}}.xml">XML<i></i></a></li>
            {% endif %}
            <li><a class="switcher" id="s_proj4" href="{{url_format}}.proj4">PROJ.4<i></i></a></li>
            <li><a class="switcher" id="s_proj4js" href="{{url_format}}.proj4js">Proj4js<i></i></a></li>
            {% if export['usgs'] != "" %}
            <li><a class="switcher" id="s_usgs" href="{{url_format}}.usgs">USGS<i></i></a></li>
            {% endif %}
            <li><a class="switcher" id="s_geoserver" href="{{url_format}}.geoserver">GeoServer<i></i></a></li>
            <li><a class="switcher" id="s_mapfile" href="{{url_format}}.mapfile">MapServer<i></i></a></li>
            <!-- <li><a class="switcher" id="s_mapserverpython" href="{{url_format}}.mapserverpython">MapSever - Python<i></i></a></li> -->
            <li><a class="switcher" id="s_mapnik" href="{{url_format}}.mapnik">Mapnik<i></i></a></li>
            <!-- <li><a class="switcher" id="s_mapnikpython" href="{{url_format}}.mapnikpython">Mapnik - Python<i></i></a></li> -->
            <li><a class="switcher" id="s_postgis" href="{{url_format}}.sql">PostGIS<i></i></a></li>
            <!-- <li><a class="switcher" id="s_json" href="{{url_format}}.json">JSON<i></i></a></li> -->
          </ul>
        </div>
      </div>

        <div class="col9">
          <div class="code-definition-container code_visible" id="s_html_code">
            <p>Definition: Well Known Text (WKT)</p>
            <ul>
              <li><a href="{{url_format}}.prettywkt">Open</a></li>
              <li><a id="s_html_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.prettywkt">Copy URL</a></li>
              <li><a id="s_html_copyText" class="clipboard" data-clipboard-target="#s_html_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.prettywkt?download">Download</a></li>
            </ul>
            <div class="syntax">
              {{export_html|safe}}
            </div>
            <div class="syntax">
              <pre id="s_html_text">{{export['prettywkt']}}</pre>
            </div>
          </div>
        </div>

        <div class="col9">
          <div class="code-definition-container" id="s_esriwkt_code">
            <p>Definition: ESRI WKT</p>
            <ul>
              <li><a href="{{url_format}}.esriwkt">Open</a></li>
              <li><a id="s_esriwkt_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.esriwkt">Copy URL</a></li>
              <li><a id="s_esriwkt_copyText" class="clipboard" data-clipboard-target="#s_esriwkt_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.esriwkt?download">Download</a></li>
            </ul>
            <div class="syntax">
              <pre id="s_esriwkt_text">{{export['esriwkt']|safe}}</pre>

            </div>
          </div>
        </div>

        <div class="col9">
          <div class="code-definition-container" id="s_proj4_code">
            <p>Definition: PROJ.4</p>
            <ul>
              <li><a href="{{url_format}}.proj4">Open</a></li>
              <li><a id="s_proj4_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.proj4">Copy URL</a></li>
              <li><a id="s_proj4_copyText" class="clipboard" data-clipboard-target="#s_proj4_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.proj4?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_proj4_text">{{export['proj4']}}</pre>
            </div>
          </div>
        </div>

        <div class="col9">
          <div class="code-definition-container" id="s_proj4js_code">
            <p>Definition: JavaScript (Proj4js) </p>
            <ul>
              <li><a href="{{url_format}}.js">Open</a></li>
              <li><a id="s_proj4js_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.js">Copy URL</a></li>
              <li><a id="s_proj4js_copyText" class="clipboard" data-clipboard-target="#s_proj4js_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.js?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_proj4js_text">{{export['proj4js']}}</pre>
            </div>
          </div>
        </div>

        {% if ogpxml != "" %}
        <div class="col9">
          <div class="code-definition-container" id="s_gml_code">
            <p>Definition: OGC GML</p>
            <ul>
              <li><a href="{{url_format}}.gml">Open</a></li>
              <li><a id="s_gml_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.gml">Copy URL</a></li>
              <li><a id="s_gml_copyText" class="clipboard" data-clipboard-target="#s_gml_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.gml?download">Download</a></li>

            </ul>
            <div class="syntax">
              {{ogpxml_highlight|safe}}
            </div>
            <div class="syntax">
              <pre id="s_gml_text">{{ogpxml}}</pre>
            </div>
          </div>
        </div>

        {% endif %}

        {% if export['xml'] != "" %}
        <div class="col9">
          <div class="code-definition-container" id="s_xml_code">
            <p>Definition: XML</p>
            <ul>
              <li><a href="{{url_format}}.xml">Open</a></li>
              <li><a id="s_xml_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.xml">Copy URL</a></li>
              <li><a id="s_xml_copyText" class="clipboard" data-clipboard-target="#s_xml_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.xml?download">Download</a></li>

            </ul>
            <div class="syntax">
              {{xml_highlight|safe}}
            </div>
            <div class="syntax">
              <pre id="s_xml_text">{{export['xml']}}</pre>
            </div>
          </div>
        </div>

        {% endif %}

        <div class="col9">
          <div class="code-definition-container" id="s_geoserver_code">
            <p>Definition: GeoServer</p>
            <ul>
              <li><a href="{{url_format}}.geoserver">Open</a></li>
              <li><a id="s_geoserver_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.geoserver">Copy URL</a></li>
              <li><a id="s_geoserver_copyText" class="clipboard" data-clipboard-target="#s_geoserver_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.geoserver?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_geoserver_text">{{export['geoserver']}}</pre>
            </div>
          </div>
        </div>


        <div class="col9">
          <div class="code-definition-container" id="s_mapfile_code">
            <p>Definition: MapServer - MAPfile</p>
            <ul>
              <li><a href="{{url_format}}.mapfile">Open</a></li>
              <li><a id="s_mapfile_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.mapfile">Copy URL</a></li>
              <li><a id="s_mapfile_copyText" class="clipboard" data-clipboard-target="#s_mapfile_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.mapfile?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_mapfile_text">{{export['mapfile']}}</pre>
            </div>
          </div>
        </div>

        <!--
        <div class="col9">
<div class="code-definition-container" id="s_mapserverpython_code">
          <p>Definition: MapServer - Python</p>
          <ul>
            <li><a href="{{url_format}}.mapserverpython">Open</a></li>
            <li><a id="s_mapserverpython_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.mapserverpython">Copy URL</a></li>
            <li><a id="s_mapserverpython_copyText" class="clipboard" data-clipboard-target="#s_mapserverpython_text">Copy TEXT</a></li>
            <li><a href="{{url_format}}.mapserverpython?download">Download</a></li>

          </ul>
          <div class="syntax">
            <pre id="s_mapserverpython_text">{{export['mapserverpython']}}</pre>
          </div>
        </div>
      </div>

-->
        <div class="col9">
          <div class="code-definition-container" id="s_mapnik_code">
            <p>Definition: Mapnik</p>
            <ul>
              <li><a href="{{url_format}}.mapnik">Open in new page</a></li>
              <li><a id="s_mapnik_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.mapnik">Copy URL</a></li>
              <li><a id="s_mapnik_copyText" class="clipboard" data-clipboard-target="#s_mapnik_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.mapnik?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_mapnik_text">{{export['mapnik']}}</pre>
            </div>
          </div>
        </div>
        <!--   <div class="col9">
<div class="code-definition-container" id="s_mapnikpython_code">
          <p>Definition: Mapnik - Python</p>
          <ul>
            <li><a href="{{url_format}}.mapnikpython">Open</a></li>
            <li><a id="s_mapnikpython_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.mapnikpython">Copy URL</a></li>
            <li><a id="s_mapnikpython_copyText" class="clipboard" data-clipboard-target="#s_mapnikpython_text">Copy TEXT</a></li>
            <li><a href="{{url_format}}.mapnikpython?download">Download</a></li>

          </ul>
          <div class="syntax">
            <pre id="s_mapnikpython_text">{{export['mapnikpython']}}</pre>
          </div>
        </div>
      </div> -->

        <div class="col9">
          <div class="code-definition-container" id="s_postgis_code">
            <p>Definition: SQL (PostGIS)</p>
            <ul>
              <li><a href="{{url_format}}.sql">Open</a></li>
              <li><a id="s_postgis_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.sql">Copy URL</a></li>
              <li><a id="s_postgis_copyText" class="clipboard" data-clipboard-target="#s_postgis_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.sql?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_postgis_text">{{export['postgis']}}</pre>
            </div>
          </div>
        </div>

        <div class="col9">
          <div class="code-definition-container" id="s_wkt_code">
            <p>Definition: OGC WKT</p>
            <ul>
              <li><a href="{{url_format}}.wkt">Open</a></li>
              <li><a id="s_wkt_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.wkt">Copy URL</a></li>
              <li><a id="s_wkt_copyText" class="clipboard" data-clipboard-target="#s_wkt_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.wkt?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_wkt_text">{{export['ogcwkt']}}</pre>
            </div>
          </div>
        </div>

        {% if export['usgs'] != "" %}
        <div class="col9">
          <div class="code-definition-container" id="s_usgs_code">
            <p>Definition: USGS</p>
            <ul>
              <li><a href="{{url_format}}.usgs">Open</a></li>
              <li><a id="s_usgs_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.usgs">Copy URL</a></li>
              <li><a id="s_usgs_copyText" class="clipboard" data-clipboard-target="#s_usgs_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.usgs?download">Download</a></li>

            </ul>
            <div class="syntax">
              <pre id="s_usgs_text">{{export['usgs']}}</pre>
            </div>
          </div>
        </div>

        {% endif %}

        {% elif ogpxml %}
        <div id="eb-menu-container">
          <h4>Export</h4>
          <ul id="eb-menu">
            <li><a class="switcher switcher_selected" id="s_gml" href="{{url_format}}.gml">OGP XML<i></i></a></li>
          </ul>
        </div>

        <div class="col9">
          <div class="code-definition-container code_visible" id="s_gml_code">
            <p>Definition: OGP XML</p>
            <ul>
              <li><a href="{{url_format}}.gml">Open</a></li>
              <li><a id="s_gml_copyUrl" class="clipboard" data-clipboard-text="//epsg.io{{url_format}}.gml">Copy URL</a></li>
              <li><a id="s_gml_copyText" class="clipboard" data-clipboard-target="#s_gml_text">Copy TEXT</a></li>
              <li><a href="{{url_format}}.gml?download">Download</a></li>

            </ul>
            <div class="syntax">
              {{ogpxml_highlight}}
            </div>
            <div class="syntax">
              <pre id="s_gml_text">{{ogpxml}}</pre>
            </div>
          </div>
          {% endif %}
        </div>
      </div>
    </div>
    {% if found_trans == False %}
    <div id="projected-link">
      {% if projcrs_by_gcrs %}
      {% if kind == "Projected coordinate system" %}
      <h3>Coordinates with same geodetic base (<a href="/{{item['geogcrs'][0]}}">{{item['geogcrs'][1]}}</a>):</h3>
      {% else %}
      <h3>Coordinates using this {{kind.lower()}}:</h3>
      {% endif %}
      {% endif %}

      {% for r in projcrs_by_gcrs %}
      <a href="/{{r['result']['code']}}">EPSG:{{r['result']['code']}} {{r['result']['name']}}</a>
      {% if r['result']['code_trans'] %}
      <a href="{{r['result']['code']}}/map"> (map)</a> <br />
      {% else %}
      <br />
      {% endif %}
      {% endfor %}

      {% if more_gcrs_result %}
      <a href="{{more_gcrs_result}}">More</a>
      {% endif %}
    </div>
    {% endif %}
    <div class="row">
      <div class="container">

        <div id="disqus_thread"></div>
        <script type="text/javascript">
          /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
          var disqus_shortname = 'epsg'; // required: replace example with your forum shortname

          /* * * DON'T EDIT BELOW THIS LINE * * */
          (function() {
            var dsq = document.createElement('script');
            dsq.type = 'text/javascript';
            dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
          })();
        </script>
        <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
      </div>
    </div>
  </div>

  <script type="text/javascript">
    detail_init();
  </script>


  {% endblock %}
